package tech.aistar.corejava.day05;

import java.util.Arrays;

/**
 * Created by 李雨昂 on 2019/7/19.
 */
public class StudentArrDemo {
    public static void main(String[] args) {
        Student[] students = new Student[2];

//        String[] arr = new String[2];
//        String s1 = "hello";
//        arr[0]  = s1;

//        System.out.println(arr[0]);

        Student s1 = new Student(1,"tom");
        Student s2 = new Student(2,"lya");

        students[0] = s1;
        students[1] = s2;
        for (int i = 0; i < students.length; i++) {
            System.out.println(students[i]);
        }
        for(Student t:students){
            System.out.println(t);
        }

        System.out.println("=========");
        System.out.println(Arrays.toString(students));
        //System.out.println(s.toString());
    }


}
